<?php

declare(strict_types=1);

namespace App\Model;

use Hyperf\DbConnection\Model\Model;

/**
 */
class CustomerLogLogin extends Model
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'customer_log_login';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = [
        'account', 'login_ip', 'browser', 'platform', 'login_at', 'status'
    ];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = [];

    public bool $timestamps = false;


    public function getLoginAtAttribute($value): string
    {
        return date('Y-m-d H:i', $value);
    }
}
